<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="IE=edge" >
        <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/>
        <title>DANCEA网校 | 在线学习</title>
        <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.9.3/skins/default/aliplayer-min.css" />
        <script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.9.3/aliplayer-min.js"></script>
        <script type="text/javascript" charset="utf-8" src="/public/btoc/v1/js/jquery-1.12.4.min.js"></script>
        <script type="text/javascript" charset="utf-8" src="/public/btoc/v1/js/common.min.js"></script>
    </head>

    <body>
        <div id="video-box"></div>

        <script>
            //获取视频URL
            var getVideoUrl= function () {
                var courseId = getUrlParam("id");
                $.post("/webschool/v1/course/getCourseInfoById", {id:courseId}, function(data) {
                    initVideoObject(data.video);
                });
            };
            getVideoUrl();

            //初始化视频播放器
            var initVideoObject = function (videoUrl) {
                var player = new Aliplayer({
                    id: "video-box",
                    source: videoUrl,
                    width: "1600px",
                    height: "1000px",
                    autoplay: false,
                    isLive: false,
                    components: [{
                    name: 'RateComponent',
                    type: AliPlayerComponent.RateComponent
                    }]
                }, function (player) {
                    console.log("Player...make...");
                });
            };
        </script>
    </body>
</html>

